2nd High Lift Prediction Workshop

Alpha = 7deg , Re = 15E+06 , DLR - F11 configuration

References

High Lift Workshop

Define case name

This is the solver case to be analysed


In [1]:
# Names of cases
case_name = 'v2'

Define Data Location

For remote data the interaction will use ssh to securely interact with the data
This uses the reverse connection capability in paraview so that the paraview server can be submitted to a job scheduler
Note: The default paraview server connection will use port 11111


In [2]:
remote_data = True
data_dir='/gpfs/cfms/workarea/projects/hyper_flux/high_lift/7.03938'

data_host='acimpoeru@vis03'

remote_server_auto = True

paraview_cmd='mpiexec /gpfs/cfms/apps/bin/pvserver'
if not remote_server_auto:
    paraview_cmd=None

if not remote_data:
    data_host='localhost'
    paraview_cmd=None

Initialise Environment


In [3]:
%pylab inline
from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
import pylab as pl
import math
import numpy as np


Populating the interactive namespace from numpy and matplotlib
paraview version 4.2.0-75-gff3f889

Data Connection

This starts paraview server on remote host and connects


In [4]:
from zutil.post import pvserver_connect
if remote_data:
    pvserver_connect(data_host=data_host,data_dir=data_dir,paraview_cmd=paraview_cmd)


[acimpoeru@vis03] Executing task 'port_test'
[acimpoeru@vis03] Executing task 'port_test'
[acimpoeru@vis03] Executing task 'port_test'
Selected Port: 12002
[acimpoeru@vis03] Executing task 'pvserver'
[acimpoeru@vis03] run: /bin/bash -l -c "cd /gpfs/cfms/workarea/projects/hyper_flux/high_lift/13.0936 && sleep 2;mpiexec /gpfs/cfms/apps/bin/pvserver -rc --client-host=localhost -sp=12002"
[acimpoeru@vis03] out: 
[acimpoeru@vis03] out: 		   _____ ______ __  __  _____ 
[acimpoeru@vis03] out: 		  / ____|  ____|  \/  |/ ____|
[acimpoeru@vis03] out: 		 | |    | |__  | \  / | (___  
[acimpoeru@vis03] out: 		 | |    |  __| | |\/| |\___ \ 
[acimpoeru@vis03] out: 		 | |____| |    | |  | |____) |
[acimpoeru@vis03] out: 		  \_____|_|    |_|  |_|_____/ 
[acimpoeru@vis03] out: 
[acimpoeru@vis03] out: ++++++++++++++++++++++++++++: System Data :++++++++++++++++++++++++++++
[acimpoeru@vis03] out: + Hostname = vis03
[acimpoeru@vis03] out: + Kernel = 2.6.32-358.el6.x86_64
[acimpoeru@vis03] out: + RHEL Release = Red Hat Enterprise Linux Server release 6.4 (Santiago)
[acimpoeru@vis03] out: + Uptime = 12:19:08 up 55 days, 2:03, 13 users,
[acimpoeru@vis03] out: ++++++++++++++++++++++++++++: User Data :++++++++++++++++++++++++++++++
[acimpoeru@vis03] out: + Username = acimpoeru
[acimpoeru@vis03] out: +++++++++++++++++++++++: Contact Information :+++++++++++++++++++++++++
[acimpoeru@vis03] out: + in case of any problems, contact: support@cfms.org.uk
[acimpoeru@vis03] out: + for feedback, contact: feedback@cfms.org.uk 
[acimpoeru@vis03] out: +++++++++++++++++++++: Maintenance Information :+++++++++++++++++++++++
[acimpoeru@vis03] out: + There is no planned maintenance taking place this week
[acimpoeru@vis03] out: +++++: Group Home Directory Quota Usage (updated every 10 mins)   +++++
[acimpoeru@vis03] out: + 
[acimpoeru@vis03] out: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[acimpoeru@vis03] out: [acimpoeru@vis03] rtunnel: opened reverse tunnel: (u'127.0.0.1', 48935) -> ('172.20.1.25', 22) -> ('localhost', 11111)
Connecting to client (reverse connection requested)...
[acimpoeru@vis03] out: Connection URL: csrc://localhost:12002
[acimpoeru@vis03] out: Client connected.
[acimpoeru@vis03] out: 

In [5]:
from zutil.post import get_case_parameters,print_html_parameters
parameters=get_case_parameters(case_name,data_host=data_host,data_dir=data_dir)

In [6]:
from zutil.post import get_status_dict
status=get_status_dict(case_name,data_host=data_host,data_dir=data_dir)
num_procs = str(status['num processor'])

In [7]:
import zutil
import zutil.post as post
from zutil.post import get_csv_data

forces = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/lift_and_forces/forces.csv",header=True,remote=True,delim=',')

Cp profiles at different positions


In [9]:
from matplotlib.backends.backend_pdf import PdfPages
from zutil.post import get_csv_data
from zutil.post import calc_force_wall
from IPython.display import FileLink, display 
from collections import OrderedDict
import matplotlib.font_manager as fm
from zutil.post import cp_profile
from zutil.post import cf_profile
from zutil.post import get_fw_csv_data
from zutil.post import get_case_root, get_case_report
from zutil.post import get_status_dict
#status=get_status_dict(case_name,data_host=data_host,data_dir=data_dir)
#num_procs = str(status['num processor'])

fig = figure(figsize=(20, 20),dpi=100, facecolor='w', edgecolor='k')

ref_area = 419130 

cl_comp = forces[1]
cd_comp = forces[2]
angle = forces[0]

cl = []
cd = []
alpha = 7.03938
pressure_force, friction_force = calc_force_wall(get_case_root(case_name,num_procs),
                                                 [],half_model=False,
                                                 alpha=alpha)
cl.append((pressure_force[2] + friction_force[2])/ref_area)
cd.append((pressure_force[0] + friction_force[0])/ref_area)
    

print "C_L and C_D are  = ",cl, cd


C_L and C_D are  =  [1.7905286214513652] [0.3624532357915401]
<matplotlib.figure.Figure at 0x114965150>

Convergence


In [34]:
from zutil.post import residual_plot, get_case_report
residual_plot(get_case_report(case_name))
show()


Cleaning up


In [ ]:
from zutil.post import pvserver_disconnect
if remote_data:
    print 'Disconnecting from remote paraview server connection'
    pvserver_disconnect()
    pass

In [ ]: